<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    ul {
      width: 300px;
      line-height: 30px;
      list-style: none;
    }

    li {
      margin-top: 10px;
      margin-bottom: 10px;
    }

    ul li:nth-child(odd) {
      background-color: pink;
    }

    ul li:nth-child(even) {
      background-color: #333;
    }
  </style>
</head>

<body>
  <ul id="oUl">
    <li>1</li>
    <li data-mark="black">2</li>
    <li>3</li>
    <li data-mark="black">4</li>
    <li>5</li>
    <li data-mark="black">6</li>
    <li>7</li>
    <li data-mark="black">8</li>
    <li>9</li>
    <li data-mark="black">10</li>
  </ul>
  <script>
    oUl.addEventListener('click', (e) => {
      if (e.target.dataset.mark !== 'black') return
      console.log('~~~')
    })
  </script>
</body>

</html>